package org.deltaset.samples.mvc.web;

import javax.annotation.ManagedBean;
import org.deltaset.desktop.AppItem;
import org.deltaset.desktop.MenuItem;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.context.WebApplicationContext;

/**
 *
 * @author Dimitar Makariev
 */
@ManagedBean
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
public class DesktopBean {
    
    
    public String prepareApp(AppItem appItem){
        return appItem.getAppTitle()+" src:"+appItem.getAppSrc();
    } 
    
    public String setMenuItem(MenuItem menuItem){
        return menuItem.getTitle()+" src:"+menuItem.getTemplateSrc();
    }
}
